package com.ruoyi.factorydata.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.*;

import java.util.Date;

/**
 * 入库单详情对象 inventory_receipt_detail
 *
 * @author ruoyi
 * @date 2025-07-21
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(resultMap = "com.ruoyi.factorydata.mapper.InventoryReceiptDetailMapper.InventoryReceiptDetailResult")
public class InventoryReceiptDetail extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 入库单id
     */
    @Excel(name = "入库单id")
    private Long receiptId;

    /**
     * 入库单编号
     */
    @Excel(name = "入库单编号")
    private String receiptNumber;

    /**
     * 仓库id
     */
    @Excel(name = "仓库id")
    private Long warehouseId;

    /**
     * 仓库编码
     */
    @Excel(name = "仓库编码")
    private String warehouseCode;
    /**
     * 库位id
     */
    @Excel(name = "库位id")
    private Long warehousePositionId;

    /**
     * 库位编码
     */
    @Excel(name = "库位编码")
    private String warehousePositionCode;
    /**
     * 物料id
     */
    @Excel(name = "物料id")
    private Long materialId;

    /**
     * 物料编码
     */
    @Excel(name = "物料编码")
    private String materialCode;

    /**
     * 物料图片
     */
    @Excel(name = "物料图片")
    private String materialImage;

    /**
     * 物料名称
     */
    @Excel(name = "物料名称")
    private String materialName;

    /**
     * 物料规格
     */
    @Excel(name = "物料规格")
    private String materialSpecification;

    /**
     * 预计入库数量
     */
    @Excel(name = "预计入库数量")
    private Long expectedQuantity;

    /**
     * 实际入库数量
     */
    @Excel(name = "实际入库数量")
    private Long actualQuantity;

    /**
     * 单位
     */
    @Excel(name = "单位")
    private String unit;

    /**
     * 生产日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productionDate;

    /**
     * 有效期
     */
    @Excel(name = "有效期")
    private Integer validity;
    /**
     * 删除标志（0代表存在 2代表删除）
     */
    @TableLogic(value = "0", delval = "2")
    private String delFlag;

    /**
     * 版本号
     */
    @Excel(name = "版本号")
    @Version
    private Long version;


    /**
     * 物料单位名称
     */
    @Excel(name = "单位")
    @TableField(exist = false)
    private String materialUnitName;
    /**
     * 库位名称
     */
    @Excel(name = "库位名称")
    @TableField(exist = false)
    private String warehousePositionName;
}